package service

import (
	"context"
	"time"

	pb "task/pb/business"
)

type businessServer struct{}

func (s *businessServer) Business(_ context.Context, _ *pb.BusinessRequest) (*pb.BusinessResponse, error) {
	// 模拟业务处理15ms
	time.Sleep(15 * time.Millisecond)
	return &pb.BusinessResponse{Result: 15}, nil
}

// NewBusinessServer new business server.
func NewBusinessServer() *businessServer {
	return &businessServer{}
}
